import axios from 'axios';
import {
  loginreq,
  req,
  captchareq,
  req_info,
  reqPage,
  reqDeleteUser,
  Adduser,
  Permission,
  singer,
  file,
  number
} from './axiosFun';

const BaseUrl = "http://60.205.253.99:7654/"
// const BaseUrl = "http://127.0.0.1:7654/"

//登录
export const myLogin=(params) => {return loginreq("post",BaseUrl+`user/login`,params)}
//获取当前登录用户的信息
export const usermation=() => {return req_info("get",BaseUrl+`user/getInfo`)}
//修改用户名
export const changeUserName=(params) => {return singer("post",BaseUrl+`user/userChangeNameInterface?name=${params}`)}
//用户修改自己的密码
export const userChangePasswordInterface=(params) => {return singer("post",BaseUrl+`user/userChangePasswordInterface?password=${params}`)}
//修改性别
export const ChangeSexInterface=(params) => {return singer("post",BaseUrl+`user/userChangeSexInterface?sex=${params}`)}
//修改自己的电话号码
export const ChangePhoneInterface=(params) => {return singer("post",BaseUrl+`user/userChangePhoneInterface?phone=${params}`)}
//充值接口
export const rechargeInterface=(params) => {return singer("post",BaseUrl+`user/rechargeInterface?money=${params}`)}
//修改年龄接口
export const ChangeAgeInterface=(params) =>{return singer("post",BaseUrl+`user/userChangeAgeInterface?age=${params}`)}
//修改地址
export const modifySelfAddress =(params) =>{return singer("post",BaseUrl+`user/modifySelfAddress?address=${params}`)}
//修改头像
export const ChangeHeadurlInterface=(params)=>{return singer("post",BaseUrl+`user/userChangeHeadurlInterface?headUrl=${params}`)}
//修改自我简介
export const ChangeIntroInterface=(params)=>{return singer("post",BaseUrl+`user/userChangeIntroInterface?intro=${params}`)}
//注册接口
export const Myregister=(params)=>{return req("post",BaseUrl+`user/register`,params)}
